<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="com.cn.bean.Provider "%>
<%@ taglib uri="/pager" prefix="page"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>蓝天家政系统</title>
<link href="css/style.css" rel="stylesheet">
<link href="css/bootstrap.css" rel="stylesheet">
</head>
<body>
	<div class="navbar navbar-inverse navbar-fixed-top container-fluid">
		<div class="navbar-header">
			<a class="navbar-brand" href="#"><span>蓝天家政</span>系统</a>
			<ul class="user-menu">
				<li class="dropdown pull-right"><a href="#"
					class="dropdown-toggle" data-toggle="dropdown"><img
						src="image/user-white.png"
						style="width: 25%; height: 25%; margin-right: 10%;"><label
						class="user">用户</label><span class="caret"></span></a>
					<ul class="dropdown-menu" role="menu">
						<li><a href="loginSuccessByProvider.jsp"><label
								class="user">详细信息</label></a></li>
						<li><a href="logout.action"> <label class="user">注销</label></a></li>
					</ul></li>
			</ul>
		</div>
	</div>
	<!-- /.container-fluid-->

	<div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar">
		<form role="search">
			<div class="form-group">登录成功</div>
		</form>
		<ul class="nav menu">
		<li><a href="loginSuccessByProvider.jsp">查看个人信息</a></li>
			<li><a href="listAllType.action">选择服务类型</a></li>
			<li><a href="showServicePrice.action">修改服务价格</a></li>
			<li><a href="getWaitTakeOrderByProvider.action">查看未接订单</a></li>
			<li class="active"><a href="getAllOrderByProvider.action">查看您的所有订单</a></li>
			<li role="presentation" class="divider"></li>
			<li><a href="logout.action">注销</a></li>
		</ul>

	</div>
	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main"
		id="main">
		<ol class="breadcrumb">
			<li class="active"><img src="image/home.png" class="home">/&nbsp;&nbsp;您的所有订单:</li>
		</ol>
		<div class="row">
			<div class="col-lg-12">
				<div class="panel-static panel-default">
					<div class="panel-heading">您的所有订单:</div>
					<div class="panel-body">
					<input type="hidden" id="size" value="3">
						<table border=1 bordercolor="#fff" style="width: 100%;" id="table">
							<tr>
								<th
									style="width: 5%; text-align: center; font-size: 14px; letter-spacing: 2px; background-color: #71BFFC;">ID号</th>
									<th
									style="width: 7%; text-align: center; font-size: 14px; letter-spacing: 2px; background-color: #71BFFC;">服务名称</th>
								<th
									style="width: 15%; text-align: center; font-size: 14px; letter-spacing: 2px; background-color: #71BFFC;">订单状态</th>
								<th
									style="width: 7%; text-align: center; font-size: 14px; letter-spacing: 2px; background-color: #71BFFC;">订单价格</th>
								<th
									style="text-align: center; font-size: 14px; letter-spacing: 2px; background-color: #71BFFC;">服务地址</th>
								<th
									style="width: 13%; text-align: center; font-size: 14px; letter-spacing: 2px; background-color: #71BFFC;">下单时间</th>
								<th
									style="width: 13%; text-align: center; font-size: 14px; letter-spacing: 2px; background-color: #71BFFC;">服务时间</th>
								<th
									style="width: 14%; text-align: center; font-size: 14px; letter-spacing: 2px; background-color: #71BFFC;">留言</th>
							</tr>
							<page:pager dz="16">
								<s:iterator value="#session.AllOrderList" status="status"
									id="list">
									<page:item nr="${status.count}"> 
										<tr>
											<td align="center" style="font-size: 14px;"><s:property
													value="#list.id" /></td>
											<td align="center" style="font-size: 14px;">
											<s:property
													value="#list.servicecatalog.name" />
											</td>
											<td align="center" style="font-size: 14px;">
<%-- 											<s:property value="#list.state" /> --%>
									<s:if test='#list.state.toString()=="ORDER_WAIT_TAKE"'>
 									未接单
									</s:if>
									<s:elseif test='#list.state.toString()=="ORDER_WAIT_COMFIRM"'>
 									未确认
									</s:elseif>
									<s:elseif test='#list.state.toString()=="ORDER_CANCELED"'>
									已取消
									</s:elseif>	
									<s:elseif test='#list.state.toString()=="ORDER_WAIT_REMARK"'>
									未评价
									</s:elseif>	
									<s:elseif test='#list.state.toString()=="ORDER_REMARKED"'>
									已评价
									</s:elseif>								
													</td>
											<td align="center" style="font-size: 14px;"><s:property
													value="#list.price" /></td>
											<td align="center" style="font-size: 14px;"><s:property
													value="#list.address" /></td>
											<td align="center" style="font-size: 14px;"><s:date
													name="#list.time" /></td>
											<td align="center" style="font-size: 14px;"><s:date
													name="#list.service_time" /></td>
											<td align="center" style="font-size: 14px;"><s:property
													value="#list.message" /></td>
										</tr>
									</page:item>
								</s:iterator>
							</page:pager>
						</table>

					</div>
					<div align="center" style="padding-top: 20px">
						<page:bt />
					</div>
				</div>

			</div>
		</div>
		<!-- /.row -->

	</div>
	<!--/.main-->
	<script src="js/jquery-1.11.1.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script>$(document).ready(function () {
	    //奇偶行不同颜色
	    $("#table tbody tr:odd").addClass("odd"),
	    $("#table tbody tr:even").addClass("even"),
	    $("#table tr:gt(0)").hover(
	    	    function () { $(this).addClass("hover") },
	    	    function () { $(this).removeClass("hover") })
	});</script>

</body>
</html>
